feat(tags): adds legacy_tag_formats and ignored_tag_formats settings#1297
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1297 +/- ##
==========================================
+ Coverage 97.33% 97.67% +0.33%
==========================================
Files 42 56 +14
Lines 2104 2625 +521
==========================================
+ Hits 2048 2564 +516
- Misses 56 61 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
dc08a79 to
c1f2e4f
Compare
|
wow, this is a huge one. I'll be mostly out for the following month but will try to take a look after I'm back |
|
Yes, I know, sorry. I had this idea long ago, just not had time to cover it all until now. In the meantime, enjoy your holidays ! |
|
Could you add a tutorial for this case? Otherwise it feels like we are adding a lot of features and it's unclear what a user can do with them. |
|
I completed the monorepo tutorial and added a FAQ entry but yes, I can totally write a full tutorial on changing tag convention while keeping backward compatibility 👍🏽 |
Lee-W
left a comment
There was a problem hiding this comment.
Hey @noirbizarre , thanks for making such an awesome PR! I left a few questions. I think we might need a few rounds of change and discussions before merging. But again, this is great!
844c5e2 to
fa48ec9
Compare
|
I like this a lot 💪🏻 super cool work! if possible please add some tests for |
|
I'll add some examples. I already pushed a few changes/fixes. Anyway, I have some time today, I'll advance the documentation and rework and hope to be able to provide a new iteration |
fa48ec9 to
7f7f8bd
Compare
c9d956e to
070bfdf
Compare
070bfdf to
37c45cd
Compare
|
There it is, PR updated with:
I noticed a few possible edge-cases (not introduced in this PR) I might handle after this PR. Example: it is possible to have
One solution may be to only allow |
|
I'll wait for your feedback 👍🏼 |
|
My comment is non-blocking. Feel free to merge it or make changes if you deem necessary. Awesome PR. Thanks a lot! |
|
Thanks ! 🙏🏼 |
|
this PR causes |
Starting in 4.4.0 due to commitizen-tools#1297 when an invalid tag is present an exception is thrown This commit ignores the invalid tags Follow up from commitizen-tools#1375
Starting in 4.4.0 due to commitizen-tools#1297 when an invalid tag is present an exception is thrown This commit ignores the invalid tags Follow up from commitizen-tools#1375
Description
This PR add 2 new settings to handle tag formats;
legacy_tag_formatsallowing tag format to change over time while retaining the ability to work with legacy versionignored_tag_formatsto specify expected tag that should not raiseInvalidVersion.So projects which change tag formats and have expected but non-version tags can have these settings:
By doing so, I had to start grouping tag handling and introduce a
tags.TagRulesobject which is responsible for handling all tags rules, initially spread overtag_format,version_schemes andversion_providersChecklist
./scripts/formatand./scripts/testlocally to ensure this change passes linter check and testExpected behavior
Steps to Test This Pull Request
version_provider = "scm"(not mandatory but allows testing the full scope)tag_formattag_formatinlegacy_tag_formatand define a newtag_formattag_formatthen:
random-*toignored_tag_formatsrandom-tagAdditional context
There might be a 2nd PR handling a
changelog_version_formatsetting to customize the version rendering in the changelog so:tag_formatchanges